<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
  <head>
    <title>
    </title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="css/ui-tab.css">
    <link rel="stylesheet" href="css/ui-input.css">
    <link rel="stylesheet" href="css/ui-img.css">
    <link rel="stylesheet" href="css/ui-res.css">
    <link rel="stylesheet" href="css/ui-list.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-color.css">
	<link rel="stylesheet" href="css/style.css">
    <script src="js/zy_control.js"></script>
	<script src="js/zy_click.js"></script>
	<script src="js/zy_anim.js"></script>
	<script src="js/dis_control.js"></script>
	<script src="js/dis_share.js"></script>
    <script>
	</script>
  </head>
<body class="um-vp" ontouchstart>
	<div class="c-wh uc-n uinput">
		<div class="uinn16">
			<textarea placeholder="最多输入140字" name="textarea-0" class="uc-n ulev0 umh11" id="txt"></textarea>
		</div>
		<div class="texbb"></div>
	</div>
	
	<div class="uinn3">
		<div class="ub tab2 t-wh">	
			<div ontouchstart="zy_touch('tp-click')" onclick="getpic();" class="ub-f1 ub ub-ver tab-act umar-t">
				<div class="ub-f1 ub-img5 tp-tp"></div>
			</div>
			<div ontouchstart="zy_touch('tp-click')" onclick="opnecamera();" class="ub-f1 ub ub-ver tab-act umar-t">
				<div class="ub-f1 ub-img5 tp-zx"></div>
			</div>
			<div class="ub-f3"></div>
			<div id='img'>
				
			</div>
		</div>
	</div>
	
</body>
<script>
zy_init();
var src = '';
var elt = $$('txt');

window.uexOnload=function(type)
{
	if(!type){
		uexWindow.setBounce("1");
		uexWindow.showBounceView("0","#FFF","0");
		uexWindow.showBounceView("1","#FFF","0");
	}
	
	elt.value = weibop.cont;
}

function wbSend(){
	logs('wbSend--------->');
	var txt = elt.value;
	weiboSubmit(txt,src);
}

function getpic(){
	uexImageBrowser.cbPick = function(opCode, dataType, data) {
		showimg(data);
	}
	uexImageBrowser.pick();
}

function opnecamera(){
	uexCamera.cbOpen = function(opCode, dataType, data) {
		showimg(data);
	}
	uexCamera.open();
}

function showimg(url){
	src = url;
	var str = '<img src="'+url+'" class="uc-a1 edpic ub-f1" style="margin-right:.5em;" id="pic" ontouchstart="zy_touch(\'\')" onclick="operationpic();"/>';
	setHtml('img', str);
}


//删除、预览照片
function operationpic() {
	if (src) {
		uexWindow.cbActionSheet = function(opId, dataType, data)
		{
			if (data == "0") {
				src = '';
				removeNode('pic');
			} else if (data == "1") {
				var array = [src];
				uexImageBrowser.open(array);
			}
		}
		
		var value = ["删除","预览"];
		uexWindow.actionSheet('', '取消', value);
	}
}
</script>
</html>
